<!--{template /module/admin/view/head}-->
<div id="left_layout">
	<div id="main_content" class="container-fluid">
		<!--{template /module/admin/view/head_nav}-->
		<div class="row-fluid">
			<form method="post" action="{$ADMIN_SCRIPT}/cms/comment/_update&id={$_var[gp_id]}&page={$_var[page]}&psize={$_var[psize]}{$search[querystring]}" onsubmit="javascript:return check_form(this);">
			<input type="hidden" name="formsubmit" value="yes" />
			<div class="well widget">
				<div class="widget-header">
					<p class="text">* {lang admin.validate.require}</p>
				</div>
				<div class="widget-content">
				<fieldset>
					<p>
						<strong>{lang cms.comment_edit.view.title.label}:</strong>
						<span class="text-info">{$comment[ARTICLE_TITLE]}</span>
					</p>
					
					<p>
						<strong>{lang cms.comment_edit.view.username.label}:</strong>
						<span class="text-info">{$comment[USERNAME]}</span>
					</p>
					</p>
					
					<p>
						<strong>{lang cms.comment_edit.view.address.label}:</strong>
						<span class="text-info">{$comment[ADDRESS]}</span>
					</p>
					
					<!--{if $comment['CONNECT']}-->
					<p>
						<strong>{lang cms.comment_edit.view.connect.label}:</strong>
						<span class="text-info">{$comment[CONNECT]}</span>
					</p>
					<!--{/if}-->
					
					<p>
						<strong>{lang cms.comment_edit.view.createtime.label}:</strong>
						<span class="text-info">{$comment[CREATETIME]}</span>
					</p>
					
					<hr/>
					<label>{lang cms.comment_edit.view.content.label} *</label>
					<textarea class="span6" rows="6" name="txtContent">{$comment[CONTENT]}</textarea>
					<span class="help-inline">{lang cms.comment_edit.view.content.tips}</span>
					
					<label>{lang cms.comment_edit.view.reply.label}</label>
					<textarea class="span6" rows="2" name="txtReply">{$comment[REPLY]}</textarea>
					<span class="help-inline">{lang cms.comment_edit.view.reply.tips}</span>
					
					<hr/>
					<button type="submit" class="btn btn-small btn-primary" {$dispatches[operations][edit]}>{lang admin.operation.submit}</button>
					<button type="reset" class="btn btn-small">{lang admin.operation.reset}</button>
					<button type="button" class="btn btn-small" onclick="javascript:location.href='{$ADMIN_SCRIPT}/cms/comment&page={$_var[page]}&psize={$_var[psize]}{$search[querystring]}';">{lang admin.operation.go.back}</button>
				</fieldset>
				</div>
			</div>
			</form>
		</div>
	</div>
</div>

<script>
function check_form(frm){
	if(frm.txtContent.value.trim().length == 0){
		$(frm.txtContent).next('.help-inline').css('color', 'red');
    	frm.txtContent.focus();
    	return false;
    }
	
    return true;
}

$(function(){
	$('.fancy').uniform();
	
	$('fieldset input,textarea').blur(function(){
		$(this).next('.help-inline').css('color', '#333');
	});
});
</script>

<!--{template /module/admin/view/foot}-->